<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- AnyModel Parameter Slurper XSLT .alp parser -->
<!-- version 1.1  -->
<!-- May 18, 2008 -->
<!-- Authors: J.T. Dorion, Josh Goodwin  -->

<!--
<xsl:template match="AnyLogicWorkspace">
	<xsl:if test="@AlpVersion='6.0.12'">
		<Parameters>
			<xsl:apply-templates select="Model/ActiveObjectClasses/ActiveObjectClass/Variables/Variable"/>
		</Parameters>
	</xsl:if>
	<xsl:if test="@AlpVersion='6.0.11'">
		<Parameters>
			<xsl:apply-templates select="Model/ActiveObjectClasses/ActiveObjectClass/Variables/Variable"/>
		</Parameters>
	</xsl:if>
	<xsl:if test="@AlpVersion='6.2.2'">
		<Parameters>
			<xsl:apply-templates select="Model/ActiveObjectClasses/ActiveObjectClass/Variables/Variable"/>
		</Parameters>
	</xsl:if>
</xsl:template>
-->

<xsl:template match="AnyLogicWorkspace">
	<Parameters>
		<xsl:apply-templates select="Model/ActiveObjectClasses/ActiveObjectClass/Variables/Variable"/>
	</Parameters>
</xsl:template>

<xsl:template match="AnyLogicWorkspace/Model/ActiveObjectClasses/ActiveObjectClass/Variables/Variable">
	<!-- check to make sure we're dealing with a parameter -->
	<xsl:if test="@Class='Parameter'">
		<Parameter>
			<Name><xsl:value-of select="Name"/></Name>
			<DefaultValue><xsl:value-of select="Properties/DefaultValue"/></DefaultValue>
			<Type><xsl:value-of select="Properties/Type"/></Type>
			<Class><xsl:value-of select="parent::*/Variables::val"/></Class>
		</Parameter>
	</xsl:if>
</xsl:template>
</xsl:stylesheet>
